# -*- coding:utf-8 -*-
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from . import treeItem
class FlowModuleTree(QTreeWidget):
    picPath="./com/mat/rpa/views/workWindow/rightPanel/images/"
    def __init__(self, parent=None):
        super(FlowModuleTree, self).__init__(parent)
        self.parentPanel = parent
        #设置1列
        self.setColumnCount(1)
        #隐藏header
        self.setHeaderHidden(True)
        #添加一个默认根节点，后边可以修改名称
        self.rootNode = treeItem.TreeItemWithID(self)
        self.rootNode.setNodeName("rootNode")
        self.rootNode.setText(0,"root应用")
        #添加引用节点
        self.refNode = treeItem.TreeItemWithID(self)
        self.refNode.setNodeName("refNode")
        self.refNode.setText(0, "引用")
        self.refNode.setIcon(0, QIcon(FlowModuleTree.picPath+"reference.png"))
        # 添加资源节点
        self.resourceNode = treeItem.TreeItemWithID(self)
        self.resourceNode.setNodeName("resourceNode")
        self.resourceNode.setText(0, "资源文件")
        self.resourceNode.setIcon(0, QIcon(FlowModuleTree.picPath + "resource.png"))
        # 添加主流程节点
        self.mainFlowNode = treeItem.TreeItemWithID(self)
        self.mainFlowNode.setNodeName("mainFlowNode")
        self.mainFlowNode.setText(0, "主流程.flow")
        self.mainFlowNode.setIcon(0, QIcon(FlowModuleTree.picPath + "subflow.png"))




